home *** CD-ROM | disk | FTP | other *** search
- function init()
- {
- var _loc2_ = Tardis.ActiveSection.id;
- var _loc1_ = Tardis.Colors;
- strSECTION_COLOR = _loc1_.getString(_loc2_);
- SECTION_COLOR = _loc1_.getHex(_loc2_);
- strSECTION_COLOR50 = _loc1_.getString(_loc2_ + "50");
- SECTION_COLOR50 = _loc1_.getHex(_loc2_ + "50");
- DEFAULT_COLOR = _loc1_.getHex("default");
- DEFAULT_COLOR50 = _loc1_.getString("default50");
- strDEFAULT_COLOR = _loc1_.getString("default");
- ndTracks = nodeData.byName("track");
- strTrackpath = Tardis.ASSETS_FOLDER + ndTracks.attributes.path;
- audioText_FF.htmlText = ndTracks.byName("body").getText();
- audioText_FF.textColor = DEFAULT_COLOR;
- var strTitle = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + nodeData.byName("labels").byName("title").getText() + "</FONT> ";
- title_FF.htmlText = strTitle;
- var strIntro = "<FONT COLOR=\"" + strDEFAULT_COLOR + "\">" + nodeData.byName("labels").byName("intro").getText() + "</FONT> ";
- intro_FF.htmlText = strIntro;
- currency_1.htmlText = currency_2.htmlText = nodeData.byName("labels").byName("currency").getText();
- var _loc3_ = "<FONT COLOR=\"" + strDEFAULT_COLOR + "\">" + nodeData.byName("labels").byName("byline1").getText() + "</FONT> ";
- byline_1.htmlText = _loc3_;
- var strByline2 = "<FONT COLOR=\"" + strDEFAULT_COLOR + "\">" + nodeData.byName("labels").byName("byline2").getText() + "</FONT> ";
- byline_2.htmlText = strByline2;
- calculate.txt.htmlText = nodeData.byName("labels").byName("calculate").getText();
- calculate.txt.autoSize = "left";
- calculate.arrowMC._x = calculate.txt._width + 4;
- cost = nodeData.byName("cost").getText();
- _visible = true;
- playSound();
- onComplete();
- }
- function interrupt()
- {
- fade(this.snd,0);
- }
- function resume()
- {
- trackUp(mc_t_1);
- }
- function playSound()
- {
- createEmptyMovieClip("mc_sound",Tardis.depth++);
- snd = new Sound(mc_sound);
- var _loc1_ = strPathPrefix + strTrackpath + ndTracks.byName("file").firstChild.nodeValue;
- snd.loadSound(_loc1_,false);
- snd.onLoad = function()
- {
- this.start();
- mc_timebar.play();
- mc_controls.gotoAndStop("active");
- };
- }
- function resumeSound(posToStart)
- {
- var _loc1_ = posToStart;
- if(_loc1_ == null)
- {
- sndPos = snd.position / 1000;
- }
- else
- {
- sndPos = _loc1_;
- }
- if(_loc1_ == 0)
- {
- trackUp(currentTrack);
- }
- else
- {
- snd.start(sndPos,1);
- }
- }
- function pauseSound()
- {
- snd.stop();
- }
- function stopSound()
- {
- snd.stop();
- delete snd;
- mc_sound.removeMovieClip();
- }
- _visible = false;
- onReady();
- onReady();
- this.onUnload = function()
- {
- interrupt();
- removeLinkListener();
- this.onUnload = null;
- };
- var cost;
- calculate.onPress = function()
- {
- var _loc1_ = Math.ceil(cost / Number(income_txt.text));
- if(_loc1_ == Infinity || isNaN(_loc1_) || _loc1_ < 1)
- {
- var _loc3_ = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + nodeData.byName("labels").byName("result1").getText() + "</FONT> ";
- output1.htmlText = _loc3_;
- }
- else if(_loc1_ > 104)
- {
- _loc3_ = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + nodeData.byName("labels").byName("result2").getText() + "</FONT> ";
- output1.htmlText = _loc3_;
- }
- else if(_loc1_ > 1)
- {
- var _loc2_ = nodeData.byName("labels").byName("result4").getText().split("|");
- _loc3_ = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + _loc2_[0] + " " + _loc1_ + " " + _loc2_[1] + "</FONT> ";
- output1.htmlText = _loc3_;
- }
- else
- {
- _loc2_ = nodeData.byName("labels").byName("result3").getText().split("|");
- _loc3_ = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + _loc2_[0] + " " + _loc1_ + " " + _loc2_[1] + "</FONT> ";
- output1.htmlText = _loc3_;
- }
- };
- Selection.setFocus(income_txt);
- Selection.setSelection(10,10);
-